<?
if(!ANTIHACK) die("ANTIHACK...");
global $baselink;
$id=intval($_GET['id']);
$query = query("select title,`baithi`.`code` as code,vote,imgindex,content,`member`.`name` as name,video,salon,address,image as avatar from baithi,member where `baithi`.`id` = $id and `member`.`id` = `baithi`.`memberID`");
$data = fetch($query);
$data["content"]=str_replace("./var/",$baselink."var/",$data["content"]);
$slide=explode("\n\n[slide]",$data["content"]);
$data["content"]=$slide[0];
$slide=explode("[/slide]",$slide[1]);
$slide=explode("\n",$slide[0]);
$data["slide"]=$slide;
$data["content1"]=strip_tags($data["content"]);
$idyoutube=explode("watch?v=",$data["video"]);
$idyoutube=$idyoutube[1];
$data["idyoutube"] = $idyoutube;
$smarty->assign("data",$data);


$smarty->display("chitietbaithi.htm");
?>